package com.dubbo.nacos.service;

import com.alibaba.dubbo.config.annotation.Service;
import com.alibaba.dubbo.rpc.RpcContext;

@Service(version = "${demo.service.version}")
public class DefaultDubboNacosDemoServiceImpl implements DubboNacousDemoService {

    @Override
    public String sayHello(String param) {
        RpcContext rpcContext = RpcContext.getContext();
        return String.format("sayHello from server [port : %d] :  %s",
                rpcContext.getLocalPort(),
                param);
    }

}
